package generationgraphe;

import java.awt.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.event.ListSelectionListener;

final public class GrapheurTabEntiers extends JComponent implements Observer{
	private static final long serialVersionUID = 3079676956820109707L;

	private IVueTableau vue;
	private ITableauEntier modele;
        private ListSelectionListener listener;
	
        public GrapheurTabEntiers(){
            
        }
	public GrapheurTabEntiers(IVueTableau vue, ITableauEntier l) {
		super();
		this.vue = vue;
                this.modele = l;
		setSize(getPreferredSize());
		this.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));		
	}

	public Dimension getPreferredSize() {
		return getMinimumSize();
	}
        
	public Dimension getMinimumSize() {
		return new Dimension(200, 200);
	}

	@Override
	public void update(Observable o, Object arg) {
		//TODO A compl�ter
		repaint();
	}

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		vue.dessine(this, g, modele);
	}
}
